1. Field of the Invention
The present invention relates to an image processing apparatus which can be suitably adapted for an electronic file, a facsimile system, a reader, a digital copying machine or the like.
2. Description of the Prior Art
A conventional image processing apparatus is known which has a slice binarizing or digitizing circuit for binarizing original image data by slicing it at a predetermined threshold level, and a binarizing circuit for performing a pseudo halftone reproduction.
An example of an apparatus of this type has a dither binarizing circuit. The dither binarizing circuit converts an image signal output from a solid-state image pick-up device such as a CCD into digital signals corresponding to pels by a 6-bit A/D converter. The circuit then performs a dither process of the digital signals to thereby perform binarization. In addition to such a dither binarizing circuit, this apparatus has a slice binarizing circuit. The slice binarizing circuit has predetermined threshold levels for a dither matrix and slices the digital signals at these threshold values, thereby performing slice binarization.
In this apparatus, a so-called automatic density control function ordinarily used for a facsimile system is frequently added. According to this automatic density control function, the background of an original image is detected to set a threshold level above the detected background level so as to suppress non-clearness of the reproduced image due to the influence of the background. When this automatic density control function is actually added to the slice binarization function, since each digital image signal corresponds to a pel, the slice binarizing circuit becomes large in size. For this reason, the overall apparatus becomes expensive.
As has been described above, various image processing apparatuses have been proposed which form images using different processing methods in accordance with an image tone of an original. More specifically, when an original has an image which does not include any halftone portion, such as a binary image of black and white including only characters and the like, a slice binarizing method is adopted in which each pel density of the original is compared with a predetermined threshold level (an intermediate level between black and white) to perform binarization. However, when an original is an image including a halftone image portion such as a photograph, the well known dither method is adopted due to economy and effectiveness.
However, originals do not usually contain only characters or photographs but frequently include both photographs and characters. In view of this, an image processing apparatus has been recently proposed which can selectively use the slice process method and the dither method. In this apparatus, while an original image is read, it is discriminated in accordance with a predetermined algorithm if the read original portion is a character image or a photograph image. One of the slice process methods and the dither method are adopted in accordance with the discrimination result obtained so as to form an optimal image.
FIG. 1 is a block diagram showing the configuration of the image processing apparatus of this type. Referring to FIG. 1, a maximum density measuring circuit 1 (to be referred to as a Dmax measuring circuit hereinafter) divides image data VD into unit blocks each consisting of 4.times.4 pels and calculates a maximum density Dmax for each block. A minimum density measuring circuit 2 (to be referred to as Dmin measuring circuit hereinafter) divides the image data VD into similar blocks as in the circuit 1 and calculates a minimum density Dmin for each block. Each of the Dmax and Dmin measuring circuits 1 and 2 comprises a RAM (not shown) having a capacity of (main scan pel number/4 pels).times.(4 or 6 bits), and a comparator (not shown). The image data VD is received from an image reader or the like. A subtracter 3 calculates the difference Dmax - Dmin) for, each block in accordance with the outputs from the Dmax and Dmin measuring circuits 1 and 2. A comparator 4 compares the difference Dmax - Dmin) received from the subtracter 3 with a predetermined reference value Ct. The comparator 4 produces a 1-bit image area discrimination result RE1 which is "1" when the detected image area is a binary image area and is "0" when the detected image area is a halftone image area. Discrimination of an image area is performed when each fourth line scan is completed. A RAM 5 latches the current result RE1 until the next four line scan is completed. The members 3, 4 and 5 constitute a first discriminating means A1. A slice binarizing circuit 6 is a binarizing process means for binarizing image data VD in a line sequence manner. A dither process circuit 7 is a binarizing process means for similarly performing the dither process of the image data VD in a line sequence manner to perform binarization. The dither process circuit 7 and the slice binarizing circuit 6 described above are operated in synchronism with the discrimination of an image area described above. RAMs 8 and 9 delay binary data Dd and Ds from the circuits 7 and 6 by a time interval corresponding to 4 lines. A switch SW1 selects one of the binary data Dd and Ds for the same image area and is operated by the image area discrimination result RE1 received through a gate circuit 10.
Thus, in this apparatus, the input image data VD is delayed for a time interval corresponding to 4 lines, and is subjected to the dither process or the slice binarization in units of blocks in accordance with the image area discrimination result RE1. The resultant binary data is selectively produced. In this manner, a binary image and a halftone image contained in a single original can be subjected to the slice binarization and the dither process, respectively, and are reproduced properly. The binary data is supplied to an output device such as a printer.
In this apparatus, therefore, an original is divided into unit blocks each consisting of 4.times.4 pels. When the difference .DELTA.D between the maximum value Dmax and the minimum value Dmin of the image densities within each unit block is greater than the predetermined reference value Ct, the corresponding image is determined to be a binary image area. Otherwise, the corresponding image is determined to be a halftone image area. This method requires a relatively small circuit and is practical. However, assume a case wherein this method is used to reproduce an image of an original which has significant density changes from a gray level close to white to a gray level close to black. In this case, a block at a boundary corresponding to an abrupt density change is determined to be a binary image area. As a result, the density change of the reproduced image becomes (gray level relatively close to white)-(white)-(black)-(gray level relatively close to black). Thus, an abrupt change from (white) to (black) is involved.
FIG. 2 is a graph showing such changes in image density. Referring to FIG. 2, a solid curve .alpha. shows the density distribution over image areas A(1), A(0) and A(-1), and a dotted curve .beta. shows the reproduced density distribution. Since density changes .DELTA.D.sub.1 and .DELTA.D.sub.-1 for the image areas A(1) and A(-1) are respectively smaller than the predetermined reference value Ct, these areas are determined to be half tone images. These image areas are therefore subjected to the dither process and are reproduced in gray levels. In the image area A(0), since the density change .DELTA.D.sub.0 exceeds the reference value Ct, this image area is determined to be a binary image area. Therefore, within the image area A(0), pels of a portion A'(0) having a level smaller than a slice level A are reproduced with density 0, i.e., in white. However, pels of a portion A"(0) having a level exceeding the slice level A are reproduced in black, The reproduced image has the density changes of (gray level relatively close to white)-(white)-(black)-(gray level relatively close to black) as has been described above. Thus, an edge corresponding to the change from (white) to (black) is emphasized, and a noisy image is reproduced. This problem may be resolved if the reference value Ct is increased. However, in this case, characters of low levels are subjected to the dither process and are reproduced in gray levels. Therefore, the reference value Ct is generally set to be near the threshold level for binarization. This means that the two problems cannot both be resolved at the same time and that a reproduced image corresponding to details of an original image cannot be obtained.
As has been described above, another image processing apparatus has also been proposed. According to this apparatus, a selection is made between the binarization process in which the density gradient within a pel block consisting of 4.times.4 pels is calculated and signals are sliced in accordance with a predetermined threshold level, and the pseudo halftone process of 17 gray levels obtained with a 4.times.4 dither matrix. One of these processes is properly selected, so that image reproduction of an original containing both a line or character image and a halftone image can be performed. In order to reproduce a halftone image such as a photograph with about 64 gray levels, the unit gray level discrimination image area must be enlarged to a pel block of 8.times.8 pels. When the unit gray level discrimination image area is enlarged, there is too large a difference between the resolution in the image area reproduced by the binary process and the resolution in the image area reproduced by the half tone process. That is, the former resolution is about 16 pels, while the latter resolution is about 2 pels, resulting in an inconvenience.
In an image processing apparatus having an image discrimination function, in order to perform image processing in accordance with image density, an output from a solid-state image pick-up element such as a CCD which is proportional to the incident light intensity is utilized. In order to achieve a correspondence of the output with the image density, a signal proportional to the density is prepared by using, for example, an analog correction circuit or by converting (.gamma.-correcting) a quantized image signal with an ROM or the like. Thereafter, binarization and other necessary processes are performed.
However, this analog correction circuit requires adjustment. The correction with an ROM causes a reduction in the amount of data obtained after correction. Both methods are thus proved to be unsuitable.
In an image processing apparatus of this type, the background of an original image or both the background and the image are detected to determine a slice level used for binarization. When each pel density obtained in the main scan is sequentially compared with a threshold level to obtain image data, if a predetermined threshold level is determined in accordance with the maximum and minimum values of the image density obtained in the main scan, it is possible to detect a uniform density of the background and to set a corresponding threshold level. However, in a diazo original, it is difficult to set a threshold level to detect a white pel and to thereby perform so-called background skipping.
It is also difficult to prevent an erroneous setting of a threshold level due to a bit defect of a solid-state image pick-up element. In view of this, it is considered to be effective to detect an average value of the pel densities within a suitable range and to set a threshold level in accordance with the determined average value.